﻿using Aliphant.UI.Forms.Helpers;
using System.Windows.Media.Imaging;

namespace Aliphant.UI.Wallpaper.Managers
{
    internal class WallpaperManager
    {
        /// <summary>
        /// 读取原图
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public static BitmapImage? GetOrigin(string path)
        {
            return PictureHelper.CreateImage(path);
        }

        /// <summary>
        /// 读取中等质量图片
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public static BitmapImage? GetMiddle(string path)
        {
            return PictureHelper.CreateImage(path, 960);
        }

        /// <summary>
        /// 读取低分辨预览图
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public static BitmapImage? GetPreview(string path)
        {
            return PictureHelper.CreateImage(path, 200);
        }

        public static BitmapImage? GetFromUri(string path)
        {
            return new BitmapImage(new Uri(path));
        }
    }
}
